// vite.config.mts
import { fileURLToPath, URL } from "node:url";
import vue from "file:///D:/%E9%A1%B9%E7%9B%AE/shop-site/douyin-shop-vue/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import vueJsx from "file:///D:/%E9%A1%B9%E7%9B%AE/shop-site/douyin-shop-vue/node_modules/@vitejs/plugin-vue-jsx/dist/index.mjs";
import compression from "file:///D:/%E9%A1%B9%E7%9B%AE/shop-site/douyin-shop-vue/node_modules/vite-plugin-compression/dist/index.mjs";
import { visualizer } from "file:///D:/%E9%A1%B9%E7%9B%AE/shop-site/douyin-shop-vue/node_modules/rollup-plugin-visualizer/dist/plugin/index.js";

// src/config/proxy.ts
var proxy = {
  "/dev/": {
    target: "http://127.0.0.1:8006",
    changeOrigin: true,
    rewrite: (path) => path.replace(/^\/dev/, "")
  },
  "/prod/": {
    target: "https://show.cool-admin.com",
    changeOrigin: true,
    rewrite: (path) => path.replace(/^\/prod/, "/api")
  }
};

// vite.config.mts
import { cool } from "file:///D:/%E9%A1%B9%E7%9B%AE/shop-site/douyin-shop-vue/node_modules/@cool-vue/vite-plugin/dist/index.js";
var __vite_injected_original_import_meta_url = "file:///D:/%E9%A1%B9%E7%9B%AE/shop-site/douyin-shop-vue/vite.config.mts";
function toPath(dir) {
  return fileURLToPath(new URL(dir, __vite_injected_original_import_meta_url));
}
var vite_config_default = ({ mode }) => {
  const isDev = mode === "development";
  return {
    plugins: [
      vue(),
      compression(),
      vueJsx(),
      // vueDevTools(),
      cool({
        type: "admin",
        proxy,
        eps: {
          enable: true
        }
      }),
      visualizer({
        open: false,
        gzipSize: true,
        brotliSize: true
      })
    ],
    base: "/",
    server: {
      port: 9e3,
      proxy,
      hmr: {
        overlay: true
      }
    },
    css: {
      preprocessorOptions: {
        scss: {
          charset: false
        }
      }
    },
    resolve: {
      alias: {
        "/@": toPath("./src"),
        "/$": toPath("./src/modules"),
        "/#": toPath("./src/plugins"),
        "/~": toPath("./packages")
      }
    },
    esbuild: {
      // drop: isDev ? [] : ["console", "debugger"]
    },
    build: {
      minify: "esbuild",
      // terserOptions: {
      // 	compress: {
      // 		drop_console: true,
      // 		drop_debugger: true
      // 	}
      // },
      sourcemap: isDev,
      rollupOptions: {
        output: {
          chunkFileNames: "static/js/[name]-[hash].js",
          entryFileNames: "static/js/[name]-[hash].js",
          assetFileNames: "static/[ext]/[name]-[hash].[ext]",
          manualChunks(id) {
            if (id.includes("node_modules")) {
              if (!["@cool-vue/crud"].find((e) => id.includes(e))) {
                if (id.includes("prettier")) {
                  return;
                }
                return id.toString().split("node_modules/")[1].replace(".pnpm/", "").split("/")[0];
              } else {
                return "comm";
              }
            }
          }
        }
      }
    }
  };
};
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcubXRzIiwgInNyYy9jb25maWcvcHJveHkudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxcdTk4NzlcdTc2RUVcXFxcc2hvcC1zaXRlXFxcXGRvdXlpbi1zaG9wLXZ1ZVwiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9maWxlbmFtZSA9IFwiRDpcXFxcXHU5ODc5XHU3NkVFXFxcXHNob3Atc2l0ZVxcXFxkb3V5aW4tc2hvcC12dWVcXFxcdml0ZS5jb25maWcubXRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi8lRTklQTElQjklRTclOUIlQUUvc2hvcC1zaXRlL2RvdXlpbi1zaG9wLXZ1ZS92aXRlLmNvbmZpZy5tdHNcIjtpbXBvcnQgeyBmaWxlVVJMVG9QYXRoLCBVUkwgfSBmcm9tIFwibm9kZTp1cmxcIjtcclxuaW1wb3J0IHsgQ29uZmlnRW52LCBVc2VyQ29uZm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